home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / COLORDLG.PAK / COLORDLG.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  78 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1991, 1995 by Borland International, All Rights Reserved
  4. //----------------------------------------------------------------------------
  5. #if !defined(COLORDLG_H)
  6. #define COLORDLG_H
  7.  
  8. #include <owl/dialog.h>
  9. #include <owl/control.h>
  10. #include <owl/scrollba.h>
  11. #include <winsys/color.h>
  12. #include "colordlg.rh"
  13.  
  14. #if defined(BUILDEXAMPLEDLL)
  15. # define _EXAMPLECLASS __export
  16. #elif defined (USEEXAMPLEDLL)
  17. # define _EXAMPLECLASS __import
  18. #else
  19. # define _EXAMPLECLASS
  20. #endif
  21.  
  22. //
  23. // class TColorControl
  24. // ~~~~~ ~~~~~~~~~~~~~
  25. class _EXAMPLECLASS TColorControl : public TControl {
  26.   public:
  27.     TColorControl(TWindow* parent, int resId, TColor color);
  28.     virtual void SetColor(TColor color);
  29.     TColor       GetColor() const {return Color;}
  30.  
  31.   private:
  32.     char far* GetClassName() {return "ColorControl";}
  33.     uint Transfer(void* buffer, TTransferDirection direction);
  34.     void EvPaint();
  35.     void EvLButtonDown(uint, TPoint&);
  36.     void EvLButtonDblClk(uint, TPoint&);
  37.  
  38.     TColor Color;
  39.  
  40.   DECLARE_RESPONSE_TABLE(TColorControl);
  41. };
  42.  
  43.  
  44. //
  45. // class TColorDialog
  46. // ~~~~~ ~~~~~~~~~~~~
  47. class _EXAMPLECLASS TColorDialog : public TDialog {
  48.   public:
  49.     TColorDialog(TWindow* parent, TColor& color);
  50.  
  51.   protected:
  52.     void SetupWindow();
  53.     void TransferData(TTransferDirection direction);
  54.  
  55.     virtual void UpdateBars(TColor color);
  56.  
  57.     void ClickFmControl1();
  58.     void ClickFmControl2();
  59.     void ClickFmControl3();
  60.     void ClickFmControl4();
  61.     void ClickFmControl5();
  62.     void ClickFmControl6();
  63.     void ClickFmControl7();
  64.     void ClickFmControl8();
  65.     void SetColorFmControl(uint Id);
  66.     void SetColorFmSlider();
  67.  
  68.     TScrollBar*    ColorBar1;
  69.     TScrollBar*    ColorBar2;
  70.     TScrollBar*    ColorBar3;
  71.     TColorControl* SelColor;
  72.  
  73.   DECLARE_RESPONSE_TABLE(TColorDialog);
  74. };
  75.  
  76. #endif // COLORDLG_H
  77.  
  78.